ifdef debug
	DBG = -g
endif

mgr=form

CXX_OPTS= $(DBG) -I. -I./include/net -I./include/threadpool

LD_OPTS=-L./lib -lthreadpool -lnet -Wl,-rpath=./lib

all: $(mgr)

srcs=$(wildcard ./*.cpp)
objs=$(patsubst %.cpp,%.o,$(srcs))

# 主程序
$(mgr):$(objs)
	g++ -o $@ $(objs) $(LD_OPTS)

%.o:%.cpp
	@echo "compiling " $<
	g++ $(CXX_OPTS) -c $< -o $@

clean:
	-rm -f $(objs) $(mgr)










